package network;

import java.util.ArrayList;

public class TestClient {

	public static void main(String[] args) {
		String answer = "";
		ArrayList<String> msg = new ArrayList<String>();

		msg.add(KrakenClientMsg.CIPHER_CLIENT.toString());
		msg.add(KrakenClientMsg.WAITING_HEADER.toString());
		//msg.add(KrakenClientMsg.WAITING_DATA.toString());
		msg.add(KrakenClientMsg.END_CLIENT.toString());
		
		String ip = ""; //test local
		
		KrakenClient krakenClient = new KrakenClient(msg, ip);
		krakenClient.connect();
		krakenClient.communicate();
		
		answer = krakenClient.getFinalAnswer();
		
		if(answer.equalsIgnoreCase("END_SERVER")){
			System.out.println("Transfert TCP réussi");
		}
		else{
			//TODO cas d'erreur
			System.out.println("Erreur Transfert TCP : "+answer);
		}
	}

}
